Skip to content

Conversation

abhishek-Rj
Copy link

@abhishek-Rj abhishek-Rj commented Sep 7, 2025

Overview

Switches JHipster generated projects to ESM by default:

  • Adds "type": "module" in package.json.ejs for Angular, React, and Vue templates.
  • Renames all .mjs.ejs template files to .js.ejs, including blueprint templates.
  • Cleans up any leftover .mjs references in templates.

Verification

  • Generated a new React app using the local generator:
    • package.json contains "type": "module"
    • No .mjs files remain outside node_modules
  • Verified React and Vue templates generate correct ESM setup.

Related Issues

Fix #30509

Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@github-actions github-actions bot added the theme: dependencies Pull requests that update a dependency file label Sep 8, 2025
@DanielFran DanielFran requested a review from mshima September 9, 2025 10:34
@abhishek-Rj
Copy link
Author

Pushed a small fix for some cjs → js imports I missed. Tests should now reflect.

@DanielFran DanielFran changed the title Fix #30509 Add type:module & rename .mjs to .js in templates Add type:module & rename .mjs to .js in templates Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make type: 'module' mandatory in package.json

1 participant